#include <stdio.h>
#include <string.h>
#include "sha1.h"

void main()
{
	char buf[1024], digest[20], hex[41];
	struct SHA1Context sha1;
	while(~scanf("%s", buf)) {
		printf("SHA1(\"%s\")= ", buf);
		SHA1Init(&sha1);
		SHA1Update(&sha1, buf, strlen(buf));
		SHA1Final(digest, &sha1);
		SHA1HexString(hex, digest);
		printf("HEX %s\n", hex);
	}
}

